
package com.insigma.business.qrcode.job.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.TrainingVideoDao;
import com.insigma.business.qrcode.job.dto.search.TrainingVideoBSearcher;
import com.insigma.business.qrcode.job.entity.TrainingVideoDO;
import com.insigma.business.qrcode.job.service.TrainingVideoService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("trainingVideoService")
public class TrainingVideoServiceImpl implements TrainingVideoService {

    @Autowired(required = false)
    private TrainingVideoDao trainingVideoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<TrainingVideoDO> search(final TrainingVideoBSearcher trainingVideoBSearcher) {
        return trainingVideoDao.search(trainingVideoBSearcher);
    }
   
    @Override
    public TrainingVideoDO get(final String id){
        return trainingVideoDao.get(id);
    }

    
    @Override
    public Integer insert(final TrainingVideoDO trainingVideoDO){
        trainingVideoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.TRAINING_VIDEO_ID));
        return trainingVideoDao.insert(trainingVideoDO);
    }

    @Override
    public Integer getTrainingVideoMaxTopWeight() {
        return trainingVideoDao.getTrainingVideoMaxTopWeight();
    }

    
    @Override
    public Integer update(final TrainingVideoDO trainingVideoDO){
        return trainingVideoDao.update(trainingVideoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return trainingVideoDao.delete(id,modifierType,modifierId);
    }

}
